onInitialize Event

Description

Fires after the list has been initialized.

Discussion

The onInitialize event is triggered when the List control is being initialized.

Resetting List State when Restoring Lists From Storage

When a List is persisted to storage, the data in the List as well as the List 'state' (i.e. client side filter, client side sorting, etc.) are also persisted.

In some cases when the List is restored from storage, a Javascript error may occur when setting the List state to the persisted state.

When a List is restored, you can set a flag that prevents restoring the list state (the data will still be restored):

this._restoreListState = false;

This flag should be specified in the list's onInitialize event.

See Also